﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AreaCategoryManage.aspx.cs"
    Inherits="ReportAnalysis_AreaCategoryManage" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/css.CSS" type="text/css" rel="stylesheet" />
    <link href="../css/tab.css" type="text/css" rel="stylesheet"/>

    <script src="../js/Common.js" type="text/javascript"></script>

    <script src="../js/calendar.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
  function document.onkeydown()     
  {
      var   e=event.srcElement; 
      if(event.keyCode==13)
      {
         return   false; 
      }
  }
  
    function Edit_click()
    {
        var HiddenID=$("HiddenID").value;
        if(isNull(HiddenID))
        {
            alert("请选择一条记录！");
            return false;
        }
        var ary = HiddenID.split(',');
        if(ary.length>2)
        {
            alert("只能选择一条记录进行修改！");
            return false;
        }
        var url="AreaCategory.aspx?EditStatus=2&ID=" + ary[0];
        window.open(url,"_self","");
    }
    function GetId(obj){
        if(obj.checked){
            $("HiddenID").value += obj.value + ",";
        }else{
            $("HiddenID").value.replace(obj.value + ",","");
        }
    }
     function sltChange(obj,lbl)
      {
        var ary = obj.split('|')
        if(ary.length>1)
            lbl.innerHTML=ary[1];
        else
            lbl.innerHTML="";
      }
    </script>

</head>
<body style="background-image: url('../images/hit_bg.gif');">
    <% 
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.Expires = 0;
        Response.CacheControl = "no-cache";
    %>
    <form id="form1" runat="server">
        <div>
            <table style="width: 98%;" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr style="height: 5;">
                    <td>
                        <div align="left" class="greynavbar" style="background-image: url('../images/hit_bg.gif');">
                            <ul id="foldertab">
                                <li><a href="BusinessForecastManage.aspx">年度规划单位业务量耗电值</a></li>
                                <li><a href="AdjustProportionManage.aspx">月度调整比例设置</a></li>
                                <li><a class="current" href="AreaCategoryManage.aspx">标杆值设置</a></li>
                                <li><a href="AuthenticationBenchmark.aspx">验证标杆值</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
            <table style="width: 98%;" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="middle" style="height: 25; width: 100%;">
                        <img id="imgIndicator" src="../images/Indicator.jpg" style="width: 21; height: 16;"
                            alt="当前位置" />标杆值分类设置：<asp:Label ID="Indicator" runat="server"></asp:Label></td>
                </tr>
                <tr style="height: 1; background-color: #dddddd;">
                    <td>
                    </td>
                </tr>
            </table>
            <table width="98%" border="0" cellpadding="0" class="table" cellspacing="0" align="center">
                <tr>
                    <td colspan="6" align="center" valign="top">
                        <!--搜索开始-->
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    区域：<asp:DropDownList ID="sltArea" DataTextField="sName" DataValueField="id" runat="server">
                                    </asp:DropDownList>
                                    日期：<asp:DropDownList ID="txtYears" runat="server" Width="110px">
                                    </asp:DropDownList>
                                    <asp:Button ID="btnSearch" runat="server" CssClass="button02" Text="查询" OnClick="btnSearch_Click" />
                                    <asp:Label ID="LabMessage" runat="server" ForeColor="Red"></asp:Label>
                                    <input type="hidden" id="HiddenID" name="HiddenID" runat="server" />
                                    <input id="btnAdd" type="button" onclick="javascript:window.location.href='AreaCategory.aspx?EditStatus=1';"
                                        value="增加" class="button05" />
                                    <input id="btnEdit" runat="server" type="button" value="修改" class="button05" onclick="Edit_click();" />
                                    <asp:Button ID="btnDelete" runat="server" CssClass="button05" Height="22px" Text="删除"
                                        OnClick="btnDelete_Click" />
                                    <asp:Button ID="btnRefresh" runat="server" Text="Button" Width="0px" Height="0px" />
                                </td>
                            </tr>
                        </table>
                        <!--列表开始-->
                        <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="AC_ID" OnRowDataBound="GridView1_RowDataBound"
                            ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"
                            PageSize="5" EmptyDataText="没搜索到相匹配的数据" BorderColor="#F9F9FB" BorderStyle="Dotted"
                            GridLines="Vertical" OnPageIndexChanging="GridView1_PageIndexChanging" OnSorting="GridView1_Sorting">
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
                            <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px" BorderStyle="Dotted" />
                            <AlternatingRowStyle BackColor="#EFEFF8" />
                            <HeaderStyle BackColor="#E3E7F0" Height="25px" />
                            <PagerTemplate>
                                <table width="100%">
                                    <tr>
                                        <td style="width: 70%" align="right">
                                            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                                            <asp:TextBox ID="txtGoPage" CssClass="input" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                                            <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                                            <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                                        <td style="width: 30%" align="right">
                                            <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="第1页 共5页 共89条"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </PagerTemplate>
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input id="check" runat="server" type="checkbox" onclick="javascript:GetId(this);"
                                            value='<%# Eval("AC_ID") %>' />
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        <input id="checkAll" title="全选" onclick="javascript:CheckAll(this);" runat="server"
                                            type="checkbox" />
                                    </HeaderTemplate>
                                    <ItemStyle Width="5%" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="AreaName" HeaderText="区域名称" SortExpression="AreaName">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Years" HeaderText="年月" SortExpression="Years">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Name" HeaderText="分类名称" SortExpression="Name">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="BenchMark" HeaderText="分类标杆值" SortExpression="BenchMark">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                        <!--列表结束-->
                    </td>
                </tr>
            </table>
           <table style="width: 98%;" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td valign="middle" style="height: 25; width: 100%;">
                        <img id="img1" src="../images/Indicator.jpg" style="width: 21; height: 16;"
                            alt="当前位置" />地市标杆值设置：<asp:Label ID="Label1" runat="server"></asp:Label></td>
                </tr>
                <tr style="height: 1; background-color: #dddddd;">
                    <td>
                    </td>
                </tr>
            </table>
            <table width="98%" border="0" cellpadding="0" class="table" cellspacing="0" align="center">
                <tr>
                    <td colspan="6" align="center" valign="top">
                        <!--搜索开始-->
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    区域：<asp:DropDownList ID="sltArea2" DataTextField="sName" DataValueField="id" runat="server">
                                    </asp:DropDownList>
                                    日期：<asp:DropDownList ID="txtYears2" runat="server" Width="110px">
                                    </asp:DropDownList>
                                    <asp:Button ID="btnSearch2" runat="server" CssClass="button02" Text="查询" OnClick="btnSearch2_Click" />
                                    <input type="hidden" id="Hidden1" name="HiddenID" runat="server" />
                                    <input id="btnAdd2" type="button" value="保存" runat="server" class="button05" onserverclick="btnAdd2_ServerClick" />
                                    <input id="btnExport2" type="button" value="导出" runat="server" class="button05" onserverclick="btnExport2_ServerClick"  /></td>
                            </tr>
                        </table>
                        <!--列表开始-->
                        <asp:GridView ID="GridView2" runat="server" Width="100%" DataKeyNames="FB_ID" OnRowDataBound="GridView2_RowDataBound"
                            ForeColor="#333333" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"
                            PageSize="20" EmptyDataText="没搜索到相匹配的数据" BorderColor="#F9F9FB" BorderStyle="Dotted"
                            GridLines="Vertical" OnPageIndexChanging="GridView2_PageIndexChanging" OnSorting="GridView2_Sorting">
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="#F9F9FB" />
                            <RowStyle BackColor="#F9F9FB" ForeColor="#333333" Height="24px" BorderStyle="Dotted" />
                            <AlternatingRowStyle BackColor="#EFEFF8" />
                            <HeaderStyle BackColor="#E3E7F0" Height="25px" />
                            <PagerTemplate>
                                <table width="100%">
                                    <tr>
                                        <td style="width: 70%" align="right">
                                            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="linkBtnFirst" runat="server">首页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="linkBtnPrev" runat="server">上一页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="linkBtnNext" runat="server">下一页</asp:LinkButton>
                                            <asp:LinkButton CommandName="Page" CommandArgument="Last" ID="linkBtnLast" runat="server">尾页</asp:LinkButton>
                                            <asp:TextBox ID="txtGoPage" CssClass="input" runat="server" MaxLength="5" Width="15px"></asp:TextBox>
                                            <asp:LinkButton ID="linkBtnGo" runat="server" OnClick="linkBtnGo_Click">跳转</asp:LinkButton>
                                            <asp:Label ID="labMessage" runat="server" ForeColor="Red"></asp:Label></td>
                                        <td style="width: 30%" align="right">
                                            <asp:Label ID="CurrentPageLabel" runat="server" ForeColor="Blue" Text="第1页 共5页 共89条"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </PagerTemplate>
                            <Columns>
                                <asp:BoundField DataField="FB_ID" HeaderStyle-CssClass="hidden" HeaderText="ID" SortExpression="FB_ID">
                                    <ItemStyle Width="10%" CssClass="hidden" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Name" HeaderText="区域名称" SortExpression="Name">
                                    <ItemStyle Width="10%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Years" HeaderText="年月" SortExpression="Years">
                                    <ItemStyle Width="5%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="FactBusiness" HeaderText="本月实际业务量" SortExpression="FactBusiness">
                                    <ItemStyle Width="15%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="PDCH" HeaderText="本月实际PDCH值" SortExpression="PDCH">
                                    <ItemStyle Width="15%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Powers" HeaderText="累计耗单位业务量能耗" SortExpression="Powers">
                                    <ItemStyle Width="20%" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <select id="sltType" runat="server" style="width: 80px">
                                        </select>
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        选择标杆值分类
                                    </HeaderTemplate>
                                    <ItemStyle Width="20%" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="AC_ID" HeaderStyle-CssClass="hidden" HeaderText="标杆值类型ID"
                                    SortExpression="AC_ID">
                                    <ItemStyle Width="10%" CssClass="hidden" HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label ID="lblValue" runat="server" Text=""></asp:Label>
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        单位业务量标杆值
                                    </HeaderTemplate>
                                    <ItemStyle Width="20%" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="BenchMark" HeaderStyle-CssClass="hidden" HeaderText="单位业务量标杆值"
                                    SortExpression="BenchMark">
                                    <ItemStyle Width="10%" CssClass="hidden" HorizontalAlign="Left" />
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                        <!--列表结束-->
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
